package com.home.rest;

import com.home.base.msg.ObjectRestResponse;
import com.home.base.rest.BaseRestController;
import com.home.config.InitDataConfig;
import com.home.biz.JobConfigBiz;
import com.home.entity.JobConfig;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

/**
 * @author ：chenxf
 * @date ：Created in 2019/6/19 9:37
 * @description：配置中心接口
 * @modified By：
 * @version: $
 */
@Slf4j
@RestController
@RequestMapping("jobConfig")
public class JobConfigController extends BaseRestController<JobConfigBiz, JobConfig> {


    @GetMapping("get")
    public ObjectRestResponse getInfo(JobConfig entity){

        return  ObjectRestResponse.success("查询成功").result(InitDataConfig.jobConfig);
    }

    @PutMapping("update")
    public ObjectRestResponse updateInfo(JobConfig entity){
        baseBiz.updateConfig(entity);
        return  ObjectRestResponse.success("更新成功");
    }
}
